import sys,os
def sys_palt():
    plat=sys.platform
    if 'wim' in plat:
        print('Windows操作系统')
    elif 'linux' in plat:
        print('linux操作系统')
    else:
        print('不支持的操作系统')

def sys_python():
    version=sys.version
    if version.startswith('3'):
        print(version)
        print(sys.executable)
        srcFile=os.path.join(os.getcwd(),'py3TreeDir.py')
        os.system('python '+srcFile)
    elif version.startswith('2'):
        print(version)
        print(sys.executable)
        srcFile = os.path.join(os.getcwd(), 'py2TreeDir.py')
        os.system('python ' + srcFile)

if __name__ == '__main__':
    sys_palt()
    sys_python()